package com.itheima.variable;

public class Demo6Operator {
    public static void main(String[] args) {
        short s = 1;
        //s是short类型,1默认是int类型
        //short和int想加,short会先提升int,然后再进行运算
        //需要加入强转
        //s = s + 1;
        s = (short)(s + 1);
        System.out.println(s);

        short ss =1;
        ss += 1;//ss =(short)(ss+1);
               //注意: 扩展赋值运算符底层会自带强制功能
        System.out.println(ss);
    }
}
